home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group95b.txt
/
000063_icon-group-sender _Wed Jun 21 14:00:48 1995.msg
< prev
next >
Wrap
Internet Message Format
|
1995-09-18
|
2KB
Received: by cheltenham.cs.arizona.edu; Thu, 22 Jun 1995 08:58:58 MST
Date: Wed, 21 Jun 1995 14:00:48 +0300 (WET)
From: Ehud Lamm <mslamm@pluto.mscc.huji.ac.il>
To: Bob Alexander <bobalex@netcom.com>
Cc: icon-group@cs.arizona.edu
Subject: Re: Perl v. Icon
In-Reply-To: <v01520d00ac0ceef8d07d@[199.182.128.92]>
Message-Id: <Pine.A32.3.91.950621135517.61640B-100000@pluto.mscc.huji.ac.il>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Errors-To: icon-group-errors@cs.arizona.edu
On Tue, 20 Jun 1995, Bob Alexander wrote:
> For those of you Perl fans who won't touch Icon because it doesn't have
> regular expressions, here's a bulletin:
>
> There is a full implementation of Perl regular expressions in the Icon
> program library (procs/regexp.icn).
>
> I am the author of that procedure library -- however, I can count on half
> of the fingers on one hand the number of times that I've used it. I much
> prefer Icon string scanning, even though it's not as terse.
>
This proves that if you master Icon well enough to program REs in it, you
don't really need them, and can use Icon's scanning instead.
No doubt a mjor reason in choosing which method to use is which method
you know better. :-)
An interesting question is what takes longer to learn: Perl's RE or
Icon's string scanning.
I am not sure there's an answer: it all depends on what program you are
trying to write. Some are easier in Perl and some in Icon.
Another question is which method is easier to read after written.
Icon's way is clearer - but it doesn't force locallity. By this I mean
that a single scan (for example looking for a sentence with a certain
structure) can be broken into many procedures and span mulitple lines.
Usually with a RE you have it all in one place.
On the other hand we can learn the great value of one liners from APL...
Ehud Lamm